<template>
  <div id="indexHeader">
    <!--头部-->
    <header>
      <div class="top_bar">
        <div class="abs_l"></div>
        <div class="abs_m">
          <a class='title'></a>
        </div>
        <div class="abs_r">
          <a class='search_btn'  @click="$router.push('/search')"></a>
        </div>
      </div>
    </header>
  </div>
</template>

<script>
  export default {
    data() {
      return {}
    },
    methods: {}
  }
</script>
<style lang='stylus'>
  #indexHeader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    overflow: hidden;
    header {
      display: block;
      position: relative;
      overflow: hidden;
      background-color: #00939c;
      color: #fff;
      &.fixed{
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
      }
      .title {
        background-size: 145px;
      }
      .search_btn {
        background-size: 24px;
      }
      .top_bar {
        position: relative;
        height: 44px;
        line-height: 44px;
        user-select:none;
        a{
          display: block;
          width: 100%;
          height: 100%;
          color: inherit;
          font-size: inherit;
          font-weight: inherit;
        }
        .abs_l,.abs_m,.abs_r {
          position: absolute;
          top: 0;
          width: 44px;
          height: 100%;
          font-size: inherit;
          color: inherit;
          text-align: center
        }
        .abs_l {
          left: 0;
          z-index: 1000;
        }
        .abs_m {
          width: 100%;
          font-weight: 700;
          z-index: 999;
        }
        .abs_r {
          right: 0;
          z-index: 1000;
        }
      }
    }
    nav {
      position: relative;
      height: 36px;
      line-height: 36px;
      background-color: #f4f5f6;
      border-bottom: 1px solid #ddd;
      /*更多栏目*/
      /*padding-right: 40px;  */
      .nav_ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 0;
        &::-webkit-scrollbar {
          width: 0px;
          height: 0px;
        }
        a {
          display: inline-block;
          padding-left: 10px;
          padding-right: 10px;
          margin-left: 5px;
          height: 36px;
          line-height: 36px;
          font-size: 17px;
          color: #505050;
          white-space: nowrap;
          -webkit-tap-highlight-color: rgba(0, 0, 0, .3);
          text-decoration: none;
          &:last-child {
            margin-right: 5px;
          }
          &.active {
            color: #00939c;
            border-bottom: 2px solid #00939c;
          }
        }
      }
      .nav_menu {
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        .shadow {
          position: absolute;
          width: 10px;
          height: 100%;
          left: -10px;
          background-size: contain;
          background-color: rgba(244, 245, 246, .3);
        }
        .more_btn {
          display: block;
          width: 40px;
          height: 100%;
          background-size: 20px;
          background-color: #f4f5f6;
        }
      }
    }
  }
</style>
<style>
  #indexHeader .title {
    background: url(~@/assets/img/news_logo.png)no-repeat center center;
    background-size: contain;
  }
  #indexHeader .search_btn {
    background: url(~@/assets/img/search.png)no-repeat center center;
  }
  #indexHeader .shadow {
    background: url(~@/assets/img/shadow.png) no-repeat 100%;
  }
  #indexHeader .more_btn {
    background: url(~@/assets/img/menu_more.png) no-repeat 50%;
  }
</style>
